package com.boomsecret.josql;

import org.josql.Query;
import org.josql.QueryResults;

import java.util.Arrays;
import java.util.List;

/**
 * @author wangjinliang on 2019/2/22.
 */
public class JoSqlDemo {
    public static void main(String[] args) throws Exception {
        List<String> data = Arrays.asList("Burke", "Connor", "Frank", "Everett", "Albert", "George", "Harris", "David");
        Query query = new Query();
        query.parse("select * from java.lang.String where length = :length");
        query.setVariable("length", 6);
        QueryResults execute = query.execute(data);
        System.out.println(execute.getResults());
    }
}
